package com.ssy.lingxi.marketing.model.constant;


/**
 * 会员活动外部状态 - enum
 * @author fhj
 * @date 2021/06/24
 * @version 2.0.0
 */
public enum MerchantActivityOuterStatusEnum {
    /*22.1.20版废弃
    ALL(0, "所有状态"),
    TO_BE_SUBMIT(1, "待提交平台审核"),
    TO_BE_EXAM(2, "待平台审核"),
    NOT_PASSED(3, "平台审核不通过"),
    TO_BE_ONLINE(4, "待上线活动"),
    ONGOING(5, "活动进行"),
    STOP(6, "活动终止"),
    END(7, "活动结束"),
    ;

    private final Integer code;
    private final String message;

    MerchantActivityOuterStatusEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    *//**
     * 根据code获取message
     * *//*
    public static String getMessage(Integer code) {
        MerchantActivityOuterStatusEnum merchantActivityOuterStatusEnum = Arrays.stream(MerchantActivityOuterStatusEnum.values()).filter(e -> e.getCode().equals(code)).findFirst().orElse(null);
        return merchantActivityOuterStatusEnum == null ? "未知" : merchantActivityOuterStatusEnum.getMessage();
    }

    *//**
     * 获取所有
     * *//*
    public static List<Map<String, Object>> getAll() {
        return Arrays.stream(MerchantActivityOuterStatusEnum.values()).map(a -> {
            Map<String, Object> map = new HashMap<>();
            map.put("code", a.getCode());
            map.put("message", a.getMessage());
            return map;
        }).collect(Collectors.toList());
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }*/

}
